import '@/assets/common.scss'
import "@/assets/font/fonts.css"

import { createApp } from 'vue'
import App from './App.vue'

// 引入路由
import router from './router'
// 引入 pinia
import pinia from "./stores/index";

// 引入ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入ElementPlus所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 登录页炫酷的粒子特效背景!
import Particles from "@tsparticles/vue3";
import { loadFull } from "tsparticles"

// 注册全局容器
import MyContainer from "@/components/myContainer/index.vue"


const app = createApp(App)

app.use(Particles, {
    init: async(engine:any) => {
      await loadFull(engine)
      //	如果不使用动画和图形，可以使用下面的方法加载
      //	await loadSlim(engine);
    }
  })

app.use(pinia).use(router).use(ElementPlus, { size: 'small' })

app.component("MyContainer",MyContainer)

// 注册ElementPlus所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')
